package users.christy.beans;

import java.util.Map;

public class DatabaseParameters {
	private final Map<DatabaseKey, String> connectionValues;

	public Map<DatabaseKey, String> getParameters() {
		return connectionValues;
	}

	public DatabaseParameters(Map<DatabaseKey,String> parameters) {
		this.connectionValues = parameters;
	}
	
	public String getConnectionString() {
		final String connection = connectionValues.get(DatabaseKey.CONNECTIONSTRING);
		return (connection == null) ? "" : connection;				
	}
	
	public String getPassword() {
		final String password = connectionValues.get(DatabaseKey.PASSWORD);
		return (password == null) ? "" : password;		
	}
	
	public String getUsername() {
		final String username = connectionValues.get(DatabaseKey.USERNAME);
		return (username == null) ? "" : username;
	}
}
